<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改APP用户')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-user-edit" th:object="${jtAppUser}">
            <input name="userId" th:field="*{userId}" type="hidden">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">系统用户id：</label>
                    <div class="col-sm-8">
                        <input name="sysUserId" th:field="*{sysUserId}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">用户昵称：</label>
                    <div class="col-sm-8">
                        <input name="userName" th:field="*{userName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">国家码：</label>
                    <div class="col-sm-8">
                        <input name="countryCode" th:field="*{countryCode}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">电话：</label>
                    <div class="col-sm-8">
                        <input name="phoneNumber" th:field="*{phoneNumber}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">邮箱：</label>
                    <div class="col-sm-8">
                        <input name="email" th:field="*{email}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">头像路径：</label>
                    <div class="col-sm-8">
                        <input name="avatar" th:field="*{avatar}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">密码：</label>
                    <div class="col-sm-8">
                        <input name="password" th:field="*{password}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">盐加密：</label>
                    <div class="col-sm-8">
                        <input name="salt" th:field="*{salt}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">推广码：</label>
                    <div class="col-sm-8">
                        <input name="promotionCode" th:field="*{promotionCode}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">推广积分：</label>
                    <div class="col-sm-8">
                        <input name="promotionPoint" th:field="*{promotionPoint}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">佣金：</label>
                    <div class="col-sm-8">
                        <input name="commission" th:field="*{commission}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">账号状态：</label>
                    <div class="col-sm-8">
                        <div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
                            <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
                            <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">用户身份：</label>
                    <div class="col-sm-8">
                        <input name="userIdentity" th:field="*{userIdentity}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">申请状态：</label>
                    <div class="col-sm-8">
                        <div class="radio-box" th:each="dict : ${@dict.getType('jt_user_apply_status')}">
                            <input type="radio" th:id="${'applyStatus_' + dict.dictCode}" name="applyStatus" th:value="${dict.dictValue}" th:field="*{applyStatus}">
                            <label th:for="${'applyStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">最后登录IP：</label>
                    <div class="col-sm-8">
                        <input name="loginIp" th:field="*{loginIp}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">最后登录时间：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="loginDate" th:value="${#dates.format(jtAppUser.loginDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "business/user";
        $("#form-user-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-user-edit').serialize());
            }
        }

        $("input[name='loginDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>